package com.ailatrieuphu.activity;

import org.andengine.entity.scene.background.Background;
import org.andengine.opengl.texture.TextureOptions;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
import org.andengine.opengl.texture.region.TextureRegion;
import org.andengine.util.color.Color;

import com.ailatrieuphu.Message;
import com.ailatrieuphu.MyActivity;
import com.ailatrieuphu.sprite.PlayerSprite;

public class Test extends MyActivity {

	private BitmapTextureAtlas playerTextureAtlas;
	private TextureRegion playerTextureRegion, playerTextureRegion1;
	PlayerSprite playerSprite, playerSprite1;

	@Override 
	public void loadResources() {
		playerTextureAtlas = new BitmapTextureAtlas(getTextureManager(), 128,
				64, TextureOptions.DEFAULT);
		playerTextureRegion = BitmapTextureAtlasTextureRegionFactory
				.createFromAsset(playerTextureAtlas, this, "player1.png", 0, 0);
		playerTextureRegion1 = BitmapTextureAtlasTextureRegionFactory
				.createFromAsset(playerTextureAtlas, this, "player2.png", 48, 0);
		playerTextureAtlas.load();
	}

	@Override
	public void loadScenes() {
		mScene.setBackground(new Background(Color.RED));
		showToast("xin chao");
	}

	@Override
	public void processMessage(Message message) {

	}

	@Override
	public void onBackPressed() {
		finish();
		startActivity(ActivityLogin.class);
	}

	@Override
	public void disConnection() {
		// TODO Auto-generated method stub
		
	}

}
